//
//  commonUtils.m
//  心理FM
//
//  Created by qianfeng on 15/12/28.
//  Copyright (c) 2015年 ZhangLuJie. All rights reserved.
//

#import "commonUtils.h"

@implementation commonUtils

+(BOOL)isFirstBuildVesion
{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    if ([defaults objectForKey:@"Vesion"]) {
        NSString *systemVesion =[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
        BOOL isFirstV = [systemVesion isEqualToString:[defaults objectForKey:@"Vesion"]];
        [defaults setObject:systemVesion forKey:@"Vesion"];
        [defaults synchronize];
//    比较版本号是否一致
        if (isFirstV)
        {
            return NO;
        }
        return YES;
    }
    NSString *systemVesion =[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
    [defaults setObject:systemVesion forKey:@"Vesion"];
    [defaults synchronize];
    return YES;
}


@end
